package com.yuch.commons;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

//作为springmvc的异常处理器
@RestControllerAdvice
public class ProjectExcepitonAdvice {
    //拦截所有的异常信息
    @ExceptionHandler(Exception.class)
    public R doException(){



        return R.error("服务器故障！");
    }
}
